<template>
	<view>
		<view class="search-box-fat flex-row-between">
			<view class="search-box flex-row-center">
				<image :src="$getImgUrl('home/ic_ss.png')" mode="widthFix" class="img-ss"></image>
				<input type="text" placeholder="按照关键词搜索" v-model="searchText" class="img-ipt" @confirm="onSearch" />
			</view>
		</view>
		<view class="search-title-view flex-row-between">
			<view class="search-title">历史搜索</view>
			<image :src="$getImgUrl('home/ic_sc.png')" mode="widthFix" @click="onDelect" class="icon-delect"></image>
		</view>

		<view class="history-view flex-row">
			<view class="history-item" v-for="(item, index) in historyArr" :key="index" @click="onHistoryClick(item)">{{ item }}</view>
		</view>
		
		<view class="search-title-view" style="margin-top: 0;">
			<view class="search-title">热门搜索</view>
		</view>

		<show-modal></show-modal>
	</view>
</template>

<script src="./search.js"></script>

<style lang="scss">
@import '@/style/common.scss';
@import './search.scss';
@import '../shop.scss';
</style>
